home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 335_01 / as6805.txt < prev   
Text File  |  1990-12-02  |  14KB  |  661 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        A.  Appendix_for_as6805_Frankenstein_Assembler
  9.  
  10.        A.1  Pseudo_Operations
  11.  
  12.        A.1.1  Standard_Pseudo_Operation_Mnemonics
  13.  
  14.             End                                END
  15.             File Inclusion                     INCL INCLUDE
  16.             If                                 IF
  17.             Else                               ELSE
  18.             End If                             ENDI
  19.             Equate                             EQU
  20.             Set                                SET
  21.             Org                                ORG
  22.             Reserve Memory                     RESERVE RMB
  23.             Define Byte Data                   BYTE DB FCB
  24.             Define Word Data                   DW FDB WORD
  25.             Define String Data                 FCC STRING
  26.             Define Character Set Translation   CHARSET
  27.             Define Character Value             CHARDEF CHD
  28.             Use Character Translation          CHARUSE
  29.  
  30.        A.1.2  Machine_Dependent_Pseudo_Operations
  31.  
  32.        A.1.2.1  Instruction_Set_Selection
  33.  
  34.             CPU string
  35.  
  36.        The instruction set can be specified in the source file with
  37.        the CPU pseudooperation.  The string, delimited by quotes or
  38.        apostrophes, is scanned for a substring which selects which
  39.        instruction set is used.  When the program is invoked, this
  40.        operation is performed on the name of the program, then the
  41.        -p optional arguement, if any, and then any CPU statements.
  42.        The last one selects which subset of the instructions the
  43.        assembler will accept.  The instruction set can be changed
  44.        at any place in the source file.
  45.  
  46.             Instruction Set          Substrings
  47.             68hc05                   hc HC
  48.             146805                   4
  49.             6305                     3
  50.             6805                     05 l05 L05
  51.  
  52.        A.2  Instructions
  53.  
  54.        A.2.1  Instruction_List
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        Opcode   Syntax                    Selection Criteria
  75.  
  76.  
  77.        ADC       '#' expr
  78.        ADC       expr                     DIRECT
  79.        ADC       expr                     EXTENDED
  80.        ADC       indexed                  INDEX0
  81.        ADC       indexed                  INDEX1
  82.        ADC       indexed                  INDEX2
  83.  
  84.        ADD       '#' expr
  85.        ADD       expr                     DIRECT
  86.        ADD       expr                     EXTENDED
  87.        ADD       indexed                  INDEX0
  88.        ADD       indexed                  INDEX1
  89.        ADD       indexed                  INDEX2
  90.  
  91.        AND       '#' expr
  92.        AND       expr                     DIRECT
  93.        AND       expr                     EXTENDED
  94.        AND       indexed                  INDEX0
  95.        AND       indexed                  INDEX1
  96.        AND       indexed                  INDEX2
  97.  
  98.        ASL       expr                     DIRECT
  99.        ASL       indexed                  INDEX0
  100.        ASL       indexed                  INDEX1
  101.  
  102.        ASLA
  103.  
  104.        ASLX
  105.  
  106.        ASR       expr                     DIRECT
  107.        ASR       indexed                  INDEX0
  108.        ASR       indexed                  INDEX1
  109.  
  110.        ASRA
  111.  
  112.        ASRX
  113.  
  114.        BCC       expr
  115.  
  116.        BCLR      expr ',' expr
  117.  
  118.        BCS       expr
  119.  
  120.        BEQ       expr
  121.  
  122.        BHCC      expr
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        Opcode   Syntax                    Selection Criteria
  141.  
  142.  
  143.        BHCS      expr
  144.  
  145.        BHI       expr
  146.  
  147.        BHS       expr
  148.  
  149.        BIH       expr
  150.  
  151.        BIL       expr
  152.  
  153.        BIT       '#' expr
  154.        BIT       expr                     DIRECT
  155.        BIT       expr                     EXTENDED
  156.        BIT       indexed                  INDEX0
  157.        BIT       indexed                  INDEX1
  158.        BIT       indexed                  INDEX2
  159.  
  160.        BLO       expr
  161.  
  162.        BLS       expr
  163.  
  164.        BMC       expr
  165.  
  166.        BMI       expr
  167.  
  168.        BMS       expr
  169.  
  170.        BNE       expr
  171.  
  172.        BPL       expr
  173.  
  174.        BRA       expr
  175.  
  176.        BRCLR     expr ',' expr ',' expr
  177.  
  178.        BRN       expr
  179.  
  180.        BRSET     expr ',' expr ',' expr
  181.  
  182.        BSET      expr ',' expr
  183.  
  184.        BSR       expr
  185.  
  186.        CLC
  187.  
  188.        CLI
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        Opcode   Syntax                    Selection Criteria
  207.  
  208.  
  209.        CLR       expr                     DIRECT
  210.        CLR       indexed                  INDEX0
  211.        CLR       indexed                  INDEX1
  212.  
  213.        CLRA
  214.  
  215.        CLRX
  216.  
  217.        CMP       '#' expr
  218.        CMP       expr                     DIRECT
  219.        CMP       expr                     EXTENDED
  220.        CMP       indexed                  INDEX0
  221.        CMP       indexed                  INDEX1
  222.        CMP       indexed                  INDEX2
  223.  
  224.        COM       expr                     DIRECT
  225.        COM       indexed                  INDEX0
  226.        COM       indexed                  INDEX1
  227.  
  228.        COMA
  229.  
  230.        COMX
  231.  
  232.        CPX       '#' expr
  233.        CPX       expr                     DIRECT
  234.        CPX       expr                     EXTENDED
  235.        CPX       indexed                  INDEX0
  236.        CPX       indexed                  INDEX1
  237.        CPX       indexed                  INDEX2
  238.  
  239.        DAA                                INSTDAA
  240.  
  241.        DEC       expr                     DIRECT
  242.        DEC       indexed                  INDEX0
  243.        DEC       indexed                  INDEX1
  244.  
  245.        DECA
  246.  
  247.        DECX
  248.  
  249.        EOR       '#' expr
  250.        EOR       expr                     DIRECT
  251.        EOR       expr                     EXTENDED
  252.        EOR       indexed                  INDEX0
  253.        EOR       indexed                  INDEX1
  254.        EOR       indexed                  INDEX2
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        Opcode   Syntax                    Selection Criteria
  273.  
  274.  
  275.        INC       expr                     DIRECT
  276.        INC       indexed                  INDEX0
  277.        INC       indexed                  INDEX1
  278.  
  279.        INCA
  280.  
  281.        INCX
  282.  
  283.        JMP       expr                     DIRECT
  284.        JMP       expr                     EXTENDED
  285.        JMP       indexed                  INDEX0
  286.        JMP       indexed                  INDEX1
  287.        JMP       indexed                  INDEX2
  288.  
  289.        JSR       expr                     DIRECT
  290.        JSR       expr                     EXTENDED
  291.        JSR       indexed                  INDEX0
  292.        JSR       indexed                  INDEX1
  293.        JSR       indexed                  INDEX2
  294.  
  295.        LDA       '#' expr
  296.        LDA       expr                     DIRECT
  297.        LDA       expr                     EXTENDED
  298.        LDA       indexed                  INDEX0
  299.        LDA       indexed                  INDEX1
  300.        LDA       indexed                  INDEX2
  301.  
  302.        LDX       '#' expr
  303.        LDX       expr                     DIRECT
  304.        LDX       expr                     EXTENDED
  305.        LDX       indexed                  INDEX0
  306.        LDX       indexed                  INDEX1
  307.        LDX       indexed                  INDEX2
  308.  
  309.        LSL       expr                     DIRECT
  310.        LSL       indexed                  INDEX0
  311.        LSL       indexed                  INDEX1
  312.  
  313.        LSLA
  314.  
  315.        LSLX
  316.  
  317.        LSR       expr                     DIRECT
  318.        LSR       indexed                  INDEX0
  319.        LSR       indexed                  INDEX1
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.        Opcode   Syntax                    Selection Criteria
  339.  
  340.        LSRA
  341.  
  342.        LSRX
  343.  
  344.        MUL                                INSTMUL
  345.  
  346.        NEG       expr                     DIRECT
  347.        NEG       indexed                  INDEX0
  348.        NEG       indexed                  INDEX1
  349.  
  350.        NEGA
  351.  
  352.        NEGX
  353.  
  354.        NOP
  355.  
  356.        ORA       '#'